package com.example.xianji.activity;

import android.os.Bundle;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;

import com.example.xianji.R;

public class Main_my_messageActivity extends Activity implements OnClickListener {
    private RelativeLayout my_xinxi_back;
    private RelativeLayout relativelayout_zhanneixin, relativelayout_my_tiwen, relative_layout_my_receive_tiwen, relative_layout_my_liuyan;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        }
        setContentView(R.layout.activity_main_my_message);
        //XJApplication.getInstance().addActivity(this);
        my_xinxi_back = (RelativeLayout) findViewById(R.id.my_xinxi_relative_back);
        relativelayout_zhanneixin = (RelativeLayout) findViewById(R.id.relativelayout_zhanneixin);
        relativelayout_my_tiwen = (RelativeLayout) findViewById(R.id.relativelayout_my_tiwen);
        relative_layout_my_receive_tiwen = (RelativeLayout) findViewById(R.id.relative_layout_my_receive_tiwen);
        relative_layout_my_liuyan = (RelativeLayout) findViewById(R.id.relative_layout_my_liuyan);

        my_xinxi_back.setOnClickListener(this);
        relativelayout_zhanneixin.setOnClickListener(this);
        relativelayout_my_tiwen.setOnClickListener(this);
        relative_layout_my_receive_tiwen.setOnClickListener(this);
        relative_layout_my_liuyan.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.my_xinxi_relative_back) {

            this.finish();
        } else if (v.getId() == R.id.relativelayout_zhanneixin) {
            startActivity(new Intent(Main_my_messageActivity.this, Main_My_ZhanNei_XingActivity.class));

        } else if (v.getId() == R.id.relativelayout_my_tiwen) {
            startActivity(new Intent(Main_my_messageActivity.this, Main_My_TiWenActivity.class));

        } else if (v.getId() == R.id.relative_layout_my_receive_tiwen) {

            startActivity(new Intent(Main_my_messageActivity.this, Main_My_Receive_TiWenActivity.class));
        } else if (v.getId() == R.id.relative_layout_my_liuyan) {

            startActivity(new Intent(Main_my_messageActivity.this, Main_My_LiuYanActivity.class));
        }
    }


}
